package 行为型模式.命令模式;

/**
 * @Description TODO
 * @Author shallow
 * @Date 2023/3/8 10:01
 */

public class test {
    public static void main(String[] args) {
        //创建订单对象
        Order order = new Order();
        order.setDiningTable(150);
        order.setFood("西红柿鸡蛋面",2);
        order.setFood("可乐",2);

        Order order1 = new Order();
        order1.setDiningTable(250);
        order1.setFood("日式牛肉饭",1);
        order1.setFood("土豆泥",1);

        SeniorChef seniorChef = new SeniorChef();

        OrderCommand cmd1 = new OrderCommand(seniorChef,order);
        OrderCommand cmd2 = new OrderCommand(seniorChef, order1);

        Waitor waitor = new Waitor();
        waitor.setCommands(cmd1);
        waitor.setCommands(cmd2);

        waitor.orderUp();

    }
}
